import TabService from '../../tabs/base/service';
import BasePanelService from '../base/service';
import { cards } from '../../cards';
import CardService from '../../cards/base/service';
import { controls } from '../../controls';
import TextControlService from '../../controls/text/service';

// 热刷新存在问题，文件会重新加载，但不会自动重新进入构造函数

class StartService extends BasePanelService {
  title = '开始节点设置';

  tabs = [
    // 在这里使用proxy，可以减少父组件的render次数
    new TabService({
      title: '基础',
      cards: [
        cards.general,
        cards.form,
      ],
    })
    ,
    new TabService({
      title: '参与人',
      cards: [
        new CardService({
          title: '人员',
          controls: [
            new TextControlService({
              label: '创建人范围',
              text: '所有人'
            }),
            controls.cc.user,
          ],
        })
      ],
    })
    ,
  ];
}

export default StartService;
